import "./test1_csbuf";
import "./test_csbuf";

let _p1: {[key: number]: any;} = {};
let _p2: {[key: number]: any;} = {};
let _p3: {[key: number]: any;} = {};
let _p4: {[key: number]: any;} = {};
let _protocols = [_p1, _p2, _p3, _p4];

_protocols[0][1000] = Head;
_protocols[0][2001] = Test1;
_protocols[0][2002] = Test2;
_protocols[0][1001] = Test;
_protocols[0][1002] = t2;

export function getProtocol(protoId, groupNumber) {
	if (groupNumber != undefined && groupNumber > 0) {
		let ret = _protocols[groupNumber][protoId]
		if (ret != undefined) {
			return ret
		}
	}
	return _protocols[0][protoId]
}
